﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Facebook
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Facebook</h2>
    <div id="fb-root"></div>
      <img style="display:none" id="fbLogin" src="../../Content/login-button.png" />
      <fb:registration
            fields="[{'name':'name'}, {'name':'email'}]" redirect-uri="http://www.badmintonbuddy.com/FacebookLogged">
    </fb:registration>
      <!--script src="http://connect.facebook.net/en_US/all.js"></script-->
      <!--script>

          
          FB.init({
              appId: '197268050317385', cookie: true,
              status: true, xfbml: true
          });

          FB.getLoginStatus(function (response) {
              if (response.session) {
                  showUser();
              } else {
                  showLogin();
              }

          });

          function showUser() {
              FB.api('/me', function (response) {
                  alert(response.name);
              });
          }

          function showLogin() {
              $('#fbLogin').show();
              $('#fbLogin').click(function () {
                  FB.login(function (response) {
                      if (response.session) {
                          $('#fbLogin').hide();  
                          showUser();
                      } else {
                          // user cancelled login
                      }
                  });
              });
          }

          
      </script-->
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MetaContent" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
